package com.woniuxy.auth.mapper;

import com.hc.entity.Perm;
import com.hc.entity.RolePermission;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @ClassName PermMapper
 * @Description
 * @Author shanshan
 * @Date 2022/10/23 7:43
 * @Version 1.0
 **/
public interface PermMapper {

    /**
     * 根据角色Id查询权限列表
     * @param roleId
     * @return
     */
    @Select("select * from hc_perm p,hc_role_perm rp where p.id = rp.perm_id and rp.role_id =#{roleId}")
    List<Perm> getByRoleId(int roleId);

    @Select("select * from rbac_perm ")
    List<Perm> getAll();


}